package com.mright.controller.userInfo;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.mright.common.domain.PageData;
import com.mright.controller.base.BaseController;
import com.mright.service.UserInfoService;

@Controller
@RequestMapping("/userInfo")
public class UserInfoController extends BaseController {
	
	@Autowired
	private UserInfoService userInfoService;
	
	//用户管理
	@GetMapping("/userList")
    @RequiresPermissions("userInfo:view")
	public String userList(Model model)
	{
		PageData pd = this.getPageData();
		pd.put("userList", userInfoService.findAll());
		model.addAttribute("pd", pd);
		return "userInfo/userList";
	}
	
}
